<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="http://minedata.cn/minemapapi/v1.2/minemap.css">
    <script src="http://minedata.cn/minemapapi/v1.2/minemap.js"></script>
    <style>
        html,
        body,
        #map {
            width: 100%;
            height: 100%;
        }

        html,
        body {
            margin: 0;
            padding: 0;
        }

        .minemap-popup-content {
            font-size:20px;
            background-color: rgba(9, 13, 25, .8);
            color:#fff;
            height:50px;
        }
        .minemap-popup-close-button {
            font-size: 24px;
        }
        .minemap-popup-anchor-bottom .minemap-popup-tip{
            /*border-color: rgba(9, 13, 25, .8);*/
            border-top-color: rgba(9, 13, 25, .8);
        }
    </style>
</head>

<body>
    <div id="map"></div>
    <button id="close">关闭</button>
</body>
<script>
    /**
     * 基本地图加载
     * 地图缩放级别限制
     */
    minemap.accessToken = 'e919a6f32ce242f5aec22652d9dc1fdb';
    minemap.solution = 2147;
    var map = new minemap.Map({
        container: 'map',
        style: "http://minedata.cn/service/solu/style/id/2147",
        center: [116.46, 39.92],
        zoom: 16,
        // pitch: 60,
        minZoom: 17,    //地图最大缩放级别限制
        minZoom: 9,     //地图最小缩放级别限制
    });

    //添加信息窗体
    var popUp = new minemap.Popup({offset:[0,-100],closeButton:true,closeOnClick:false})
                .setLngLat([116.46, 39.92])
                .setHTML('<a href="#">我是一个窗体</a>')
                .addTo(map)
    //添加删除按钮
    var btn = document.getElementById("close");
    btn.style.position = "absolute"
    btn.style.top = "0"
    btn.style.left = "0"
    btn.addEventListener("click",function(){
        popUp.remove()
    })

</script>

</html>